package com.dundun.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName job_relationship
 */
@TableName(value ="job_relationship")
@Data
public class JobRelationship implements Serializable {
    /**
     * 求职id
     */
    @TableId(type = IdType.AUTO)
    private Long relationshipId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 简历id
     */
    private Long resumeId;

    /**
     * 岗位id
     */
    private Long internshipId;

    /**
     * 投递时间
     */
    private Date deliveryTime;

    /**
     * 状态更新时间
     */
    private Date updateTime;

    /**
     * 简历状态（0-已投递 1-已查看 2-流程中）
     */
    private Integer state;

    /**
     * 简历是否合适（0-不合适 1-合适）
     */
    private Integer fitable;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        JobRelationship other = (JobRelationship) that;
        return (this.getRelationshipId() == null ? other.getRelationshipId() == null : this.getRelationshipId().equals(other.getRelationshipId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getResumeId() == null ? other.getResumeId() == null : this.getResumeId().equals(other.getResumeId()))
            && (this.getInternshipId() == null ? other.getInternshipId() == null : this.getInternshipId().equals(other.getInternshipId()))
            && (this.getDeliveryTime() == null ? other.getDeliveryTime() == null : this.getDeliveryTime().equals(other.getDeliveryTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getFitable() == null ? other.getFitable() == null : this.getFitable().equals(other.getFitable()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRelationshipId() == null) ? 0 : getRelationshipId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getResumeId() == null) ? 0 : getResumeId().hashCode());
        result = prime * result + ((getInternshipId() == null) ? 0 : getInternshipId().hashCode());
        result = prime * result + ((getDeliveryTime() == null) ? 0 : getDeliveryTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getFitable() == null) ? 0 : getFitable().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", relationshipId=").append(relationshipId);
        sb.append(", userId=").append(userId);
        sb.append(", resumeId=").append(resumeId);
        sb.append(", internshipId=").append(internshipId);
        sb.append(", deliveryTime=").append(deliveryTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", state=").append(state);
        sb.append(", fitable=").append(fitable);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}